#ifndef IMAGE_H
#define IMAGE_H

#include <iostream>
#include <string>
#include <GL/glew.h>
#include "Export.h"
#include "IDrawable.h"
#include "Texture.h"
#include "Vector2.h"

namespace glow
{
    class SHARED Image : public IDrawable
    {
        public :

        /**
         *  Default constructor
         **/
        Image();


        /**
         *  Constructor with the file name in parameter
		 *\param filename the name of the image's file
         **/
        Image(std::string filename);


        /**
         *  Delete the image
         **/
        ~Image();

        /**
         *  Drawable the image with his texture
         *  Note : you must load a texture if you want draw it
         **/
        virtual void draw() const;


        /**
         *  Set the texture image
		 *\param filename the name of the image's file
         **/
        void load(std::string filename);


        /**
		 * Set the image's size
		 *\param size the size of the Image
		 **/
        void setSize(Vector2i size);

        /**
		 * Get the image's size
		 *\return the image's size
		 **/
        const Vector2i &getSize() const;


        /**
		 * Set the image's texels position
		 *\param position the position of the image's texels 
		 **/
        void setPosition(Vector2i position);


        /**
		 * Get the image's textels position
		 *\return the image's textels position
		 **/
        const Vector2i &getPosition() const;

        private :

        /**
		 * Position of the image
		 **/
        Vector2i _pos;


        /**
         *  Size of the image
         **/
        Vector2i _size;

        /**
         *  Pointer to the image's texture
         **/
        Texture *_texture;
    };
}
#endif //IMAGE_H